package com.srit.migration.business.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

import com.srit.base.bean.Page;
import com.srit.base.dao.SqlMapDao;
import com.srit.migration.business.bean.ColTypeRelGroup;
import com.srit.migration.business.dao.ColTypeRelGroupDao;

/**
 * @author guan
 * @by daoImpl.tem
 * 
 */
 @Service
public class ColTypeRelGroupDaoImpl implements ColTypeRelGroupDao {
	@Autowired(required = true)
	private SqlMapDao sqlMapDao;

	@Override
	public void save(ColTypeRelGroup colTypeRelGroup) {
		sqlMapDao.save("ColTypeRelGroup.save", colTypeRelGroup);
	}

	@Override
	public void update(ColTypeRelGroup colTypeRelGroup) {
		sqlMapDao.update("ColTypeRelGroup.save", colTypeRelGroup);
	}

	@Override
	public ColTypeRelGroup getById(ColTypeRelGroup colTypeRelGroup) {
		return (ColTypeRelGroup) sqlMapDao.getById("ColTypeRelGroup.getById", colTypeRelGroup.getId());
	}

	@Override
	public void delete(ColTypeRelGroup colTypeRelGroup) {
		sqlMapDao.delete("ColTypeRelGroup.delete", colTypeRelGroup);
	}

	@Override
	public void page(Page page) {
		sqlMapDao.queryForObject("ColTypeRelGroup.page", page);
	}
	
	@Override
	public void batchSave(List<ColTypeRelGroup> colTypeRelGroupList) {
		sqlMapDao.batchSave("ColTypeRelGroup.batchSave", colTypeRelGroupList);

	}

	@Override
	public List list(Page page) {
		return sqlMapDao.queryForList("ColTypeRelGroup.list", page);

	}

}
